package com.xcity.pomelo.push.msg;

import com.xcity.pomelo.PomeloRoute;
import com.xcity.pomelo.push.AbstractMessagePush;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

/**
 * 神秘商店状态推送
 * @author yang.li
 *
 */
@PomeloMessage(type = Message.Type.PUSH, route = PomeloRoute.PUSH_MESSAGE)
public class MysteryShopStatePush extends AbstractMessagePush {

	public static final MysteryShopStatePush OPEN = new MysteryShopStatePush(1);
	public static final MysteryShopStatePush CLOSE = new MysteryShopStatePush(0);
	
	private byte state; // 1: 开启, 0: 关闭
	private int leftSecond;

	private MysteryShopStatePush(int state) {
		super(MSG_MYSTERY_SHOP);
		this.state = (byte) state;
	}
	
	public MysteryShopStatePush(int state, int leftTime){
		super(MSG_MYSTERY_SHOP);
		state = (byte) state;
		this.leftSecond = leftTime;
	}

	public byte getState() {
		return state;
	}

	public void setState(byte state) {
		this.state = state;
	}
	
	public int getLeftSecond() {
		return leftSecond;
	}

	public void setLeftSecond(int leftSecond) {
		this.leftSecond = leftSecond;
	}

}
